package com.ruoyi.project.business.salarydetail.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.model.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 薪资明细对象 schedule_salary_detail
 * 
 * @author ${author}
 * @date 2024-03-20
 */
@Data
public class SalaryDetail extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**  */
    private Long id;

    /** 薪资主表 ID */
    @Excel(name = "薪资主表 ID")
    private Long salaryId;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 薪资发放月 */
    @Excel(name = "薪资发放月")
    private Integer month;

    /** 薪资发放年 */
    @Excel(name = "薪资发放年")
    private Integer year;

    /** 薪资计算日 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "薪资计算日", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime dueDate;

    /** 发薪日 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发薪日", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime payDate;

    /** 应发金额 */
    @Excel(name = "应发金额")
    private BigDecimal resultsalary;

    /** 总计金额 */
    @Excel(name = "总计金额")
    private BigDecimal totalsalary;

    /** 扣税金额 */
    @Excel(name = "扣税金额")
    private BigDecimal tax;

    /** 扣社保 */
    @Excel(name = "扣社保")
    private BigDecimal socialSecurity;

    /** 其它扣除项 */
    @Excel(name = "其它扣除项")
    private BigDecimal other;

    /** 发薪日 */
    @Excel(name = "发薪日")
    private Integer dayOfMonth;

    /** 是否删除 0:否 1:是 */
    @Excel(name = "是否删除 0:否 1:是")
    private Boolean deleted;

    /** 事件操作人id */
    @Excel(name = "事件操作人id")
    private Long creator;

    /** 事件更新人id */
    @Excel(name = "事件更新人id")
    private Long updater;

    /** 租户id */
    @Excel(name = "租户id")
    private Long tenantId;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("salaryId", getSalaryId())
            .append("userId", getUserId())
            .append("month", getMonth())
            .append("year", getYear())
            .append("dueDate", getDueDate())
            .append("payDate", getPayDate())
            .append("resultsalary", getResultsalary())
            .append("totalsalary", getTotalsalary())
            .append("tax", getTax())
            .append("socialSecurity", getSocialSecurity())
            .append("other", getOther())
            .append("remark", getRemark())
            .append("dayOfMonth", getDayOfMonth())
            .append("deleted", getDeleted())
            .append("creator", getCreator())
            .append("updater", getUpdater())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("tenantId", getTenantId())
            .toString();
    }
}
